package com.tencreat.domain.pt.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

@Data
@ApiModel("新增拼团商品参数")
public class PtGoodAddDTO {
    @NotBlank(message = "商品id不能为空")
    @ApiModelProperty(value = "商品id")
    private Long goodsId;

    @NotBlank(message = "专区id不能为空")
    @ApiModelProperty(value = "专区id")
    private Long zoneId;

    @NotNull(message = "拼图开始时间不能为空")
    @ApiModelProperty(value = "拼团开始时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startGroupTime;

    @NotNull(message = "拼图结束时间不能为空")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "拼团结束时间")
    private LocalDateTime endGroupTime;

    @NotNull(message = "开奖时间不能为空")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "开奖时间")
    private LocalDateTime drawTime;

    @NotBlank(message = "显示顺序不能为空")
    @ApiModelProperty(value = "显示顺序")
    private Long sort;

//    /**
//     * cron表达式
//     */
//    @NotBlank(message = "开奖cron表达式不能为空")
//    @ApiModelProperty(value = "开奖cron表达式不能为空")
//    private String scheduleCron;
}
